home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / os2 / nemo10.zip / NEMO-OS2.ARV < prev    next >
Text File  |  1996-02-06  |  10KB  |  289 lines

  1. #
  2. #  Captain Nemo archiver file
  3. #
  4. #  This file is part of the "Captain Nemo" file manager.
  5. #  Copyright (C) 1995-1996 by Adam Mirowski
  6. #
  7. #  $Id: common.arv 1.7 96/02/02 22:57:39 ROOT_DOS Exp $
  8. #
  9. #  This files defines which external programs will be run to perform
  10. #  operations on archives, and which arguments will be passed to them.
  11. #
  12. #  Format:
  13. #    File is divided into sections, one per archive type (format). Each
  14. #    section contains an entry per operation type. Comments are indicated
  15. #    by a hash in the first column. Empty lines are ignored. Leading and
  16. #    trailing blanks are stripped before line analysis.
  17. #
  18. #    /<archive-type>
  19. #    Introduces an archive type section. <archive-type> can be:
  20. #        A    for ARC
  21. #        J    for ARJ
  22. #        F    for seamless FTP
  23. #        G    for GZIP
  24. #        L    for LZH
  25. #        T    for tar
  26. #        U1    for OS/2 UNPACK versions before 3.0
  27. #        U2    for OS/2 UNPACK versions starting from 3.0
  28. #        O    for ZOO
  29. #        Z    for ZIP
  30. #    N is special and causes the section to be ignored. N sections
  31. #    can be used to define operations for alternative archivers.
  32. #
  33. #    <operation-letter>: <cmds>
  34. #    Defines how a specific archive operation should be performed
  35. #    for the current archive type, ie. which programs should be run
  36. #    and which arguments should be passed to them. It can also define
  37. #    the limitations of the archiver program.
  38. #
  39. #    <operation-letter> can be:
  40. #        I    for copy-in (must always store the full pathname)
  41. #        O    for copy-out (must always restore the full pathname)
  42. #        D    for mkdir
  43. #        U    for unlink
  44. #        R    for rmdir
  45. #        L    for indicating the limitations of the archiver. This
  46. #            is a series of letters, one per limitation:
  47. #                A    archiver does not restore attributes
  48. #                S    archiver corrupts the screen content
  49. #                T    archiver does not restore time/date
  50. #                Z    archiver does not restore the size
  51. #            This will only avoid the warnings. Files will always
  52. #            be extracted to the attributes stored in the archive,
  53. #            except for the size, in case the archiver performed
  54. #            a line-endings translation for text files.
  55. #            Limitations indicated using "L:" are internally
  56. #            added to the intrinsic limitations of archive formats.
  57. #
  58. #        Some additional <operation-letters> are devoted to
  59. #        seamless FTP. They are detailed separately below.
  60. #
  61. #    <cmds> are the commands to execute. The following predicates can be
  62. #        used to insert variable parts into the commands. Predicates
  63. #        can be nested as needed.
  64. #
  65. #    $A    Archive full pathname.
  66. #    $F    Filename relative to archive root.
  67. #    $B    Only the base name of filename (without directory component).
  68. #    $R    Only the directory of filename ("." if there is none).
  69. #    $G    Debug mode (echo everything to screen). If <cmds> contains
  70. #        several commands, this flag is reset after every command:
  71. #        it is only valid for the current command.
  72. #    $W    The password string, if any.
  73. #    $U    Consider entry as not defined.
  74. #    $E(x)    "x" evaluated if archive name does not have an extension.
  75. #    $P(x)    "x" evaluated if file is encrypted or to be encrypted.
  76. #    $S(x)    "x" evaluated if filename starts with a dash "-".
  77. #    $L(x)    Convert back-slashes to forward-slashes in "x".
  78. #    $I(x)    "x" evaluated if the filename is in a subdirectory.
  79. #    $D(x)    "x" evaluated if the filename is a subdirectory.
  80. #    $C(x)    Create the "x" directory and all intermediate dirs as well.
  81. #        This predicate is always evaluated if present in cmd line.
  82. #        It is useful for OS/2 UNPACK and for FTP.
  83. #    $$    The dollar sign.
  84. #    $)    The closing parenthesis sign.
  85. #    $n    Newline character (ASCII code 10).
  86. #    $r    Carriage-return character (ASCII code 13).
  87. #    $;    Command separator if several programs have to be run
  88. #        separately. This predicate is always evaluated if
  89. #        present in cmd line.
  90. #
  91. #    The meaning of generic operations is redefined for seamless
  92. #    FTP. Instead of defining the programs to execute, they define
  93. #    the FTP commands which will be passed to the FTP client program.
  94. #    They can also define defaults for some FTP specific "$" variables.
  95. #    Nemo will construct a command file for each I/O/D/U/R operation
  96. #    and give it to the FTP utility for execution. Several additional
  97. #    <operation-letters> are devoted to seamless FTP:
  98. #
  99. #    X    for starting the FTP client program. The following
  100. #        additional macros are available to construct the
  101. #        command line:
  102. #            $c    the name of a file containing the
  103. #                commands to execute.
  104. #            $h    host name
  105. #            $l    login name
  106. #            $W    password
  107. #
  108. #    P    commands for opening an FTP session.
  109. #        They will start any dynamically constructed script.
  110. #        Available additional macros are $h, $l, $W and
  111. #        their meaning is as for the "X:" operation.
  112. #
  113. #    Q    commands for closing an FTP session.
  114. #
  115. #    C    commands for changing the current directory. It will
  116. #        be used if the FTP site description uses a non-default
  117. #        directory as the initial directory. Available macros:
  118. #            $F    directory name
  119. #
  120. #    T    command for getting the current directory content of FTP
  121. #        server. Available macros:
  122. #            $t    file where the listing should be put
  123. #
  124. #    l    the default login.
  125. #
  126. #    W    the default password. It can be given in clear or mangled
  127. #        (use Shift-F7 to create file containing a mangled password),
  128. #        or dynamically asked if you set <ask> as value of "W".
  129. #
  130. #    d    sets the type of the directory listing. The argument must
  131. #        be a single letter:
  132. #            U    Unix "ls -la"
  133. #            O    OS/2 FTP server
  134. #            N    Windows NT and Windows 95 FTP servers.
  135. #        "O" and "N" are not yet implemented. Most of the Net
  136. #        servers are Unix and if you are on a LAN, it is more
  137. #        interesting to mount remote OS/2 or NT disks using
  138. #        "NET USE".
  139. #
  140. #   Multiple commands should be separated using $r and/or $n.
  141. #   (Do not use $; which should be only used for executing
  142. #   separate programs.)
  143. #
  144. #   There are no <operation-letters> for setting the default value
  145. #   of $h (host), $c (FTP command file name) or $t (directory listing
  146. #   file name).
  147. #
  148. #   A file describing an FTP site must start with
  149. #
  150. #        ftp://hostname.domainname/directoryname
  151. #
  152. #   then it can redefine nearly any <operation-letter> using the general
  153. #   syntax explained above. You cannot redefine the Limitations (L).
  154. #
  155. #   The "ftp://" string identifies the file as an FTP site description and
  156. #   mount point. It should be at the very beginning of the file. The "ftp://"
  157. #   notation is called an URL (Uniform Resource Locator).
  158. #
  159. #   If "directoryname" is supposed to be at the root of the remote
  160. #   filesystem instead of being relative to the default login directory,
  161. #   use a double slash, ie. ftp://hostname.domainname//directoryname.
  162. #
  163. # $Id: nemo-os2.arv 1.8 96/02/06 04:39:28 ROOT_DOS Exp $
  164. #---------- ARC format ----------
  165. # Archiver: arc2 6.00P by SEA
  166. # x = extract, o = overwrite
  167. /A
  168. O:    $I($U)arc2 xo $A $F
  169. I:    $I($U)arc2 a $A $F
  170. D:    $U
  171. U:    $I($U)arc2 d $A $F
  172. R:    $U
  173.  
  174. #---------- ARJ format ----------
  175. # ARJ implicitely appends .ARJ if no extension and no dot.
  176. # -y = assume yes on all queries. By default, ARJ asks
  177. # for confirmation before creating directories.
  178. # -a1 = to add even empty dirs
  179. # -g<password> = encrypt/decrypt using <password>
  180. /J
  181. # O:    arj x -y$P( -g$W) $A$E(.) $F
  182. O:    unarj x $A$E(.)
  183. I:    arj a -a1 -y $A$E(.) $F
  184. D:    arj a -a1 -y $A$E(.) $F
  185. U:    arj d -y $A$E(.) $F
  186. R:    arj d -y $A$E(.) $F
  187.  
  188. #---------- FTP access -------------------
  189. # Commands can be re-defined in .FTP files on a per-site basis.
  190. # This file only sets defaults.
  191. # Note: you may need to tweak this and the sample FTP file
  192. # a little before it works correctly.
  193. #
  194. /F
  195. # X:    ftp -s:$c
  196. # X:    ftp -s:$c $h
  197. X:    ftp $h <$c
  198. # P:    open $h$r$n$l$r$n$W$r$n
  199. P:    $l$r$n$W$r$n
  200. Q:    quit$r$n
  201. C:    cd $F$r$n
  202. T:    ls -la "$t"$r$n
  203. l:    anonymous
  204. W:    -joe@
  205. O:    bin$r$n$C($R)get "$L($F)" "$L($F)"$r$n
  206. I:    bin$r$nput "$L($F)" "$L($F)"$r$n
  207. D:    mkdir "$L($F)"$r$n
  208. U:    del "$L($F)"$r$n
  209. R:    rmdir "$L($F)"$r$n
  210.  
  211. #---------- GZIP format ---------
  212. # gzip 1.2.4
  213. # There should be a way of uncompressing a GZIP archive without destroying
  214. # it and while restoring the date and the time.
  215. /G
  216. L:    T
  217. O:    gzip -d -c "$A" > "$F"
  218. I:    gzip -c "$F" > "$A"
  219. D:    $U
  220. U:    echo ï. > "$A"
  221. R:    $U
  222.  
  223. #---------- LZH format ----------
  224. # Archiver: Lh2 by Peter Fitzsimmons, Version 2.22 (32 bit wc).
  225. # Distributed as LH2_222.ZIP. It also contains a 16-bit version.
  226. # Other possibilities (untested): X_OS2_18.EXE, which only unarchives.
  227. # /a - maintain file attributes. Without that special attributes
  228. #      will not be stored.
  229. # /s - collect/extract subdirs.
  230. # /o - no prompts.
  231. # /e - save/rest empty dirs & dir EAs(A, M or X)
  232. /L
  233. O:    lh32 X $A$E(.) $F /a /o /e
  234. I:    lh32 A $A$E(.) $F /a /o
  235. D:    lh32 A $A$E(.) $F /a /e /s
  236. U:    lh32 D $A$E(.) $F
  237. R:    lh32 D $A$E(.) $F
  238.  
  239. #---------- OS/2 unpack ----------
  240. # Archiver: unpack.exe and unpack2.exe, normally in C:\OS2.
  241. /U1
  242. O:    unpack $A $I($R /N:$B $C($R))
  243. /U2
  244. O:    unpack2 $A $I($R /N:$B $C($R))
  245.  
  246. #---------- tar(1) format ----------
  247. # Archiver: GTAK
  248. /T
  249. L:    T
  250. O:    tar xf $A $L($F)
  251. I:    tar rf $A $L($F)
  252. U:    tar Df $A $L($F)
  253.  
  254. #---------- ZIP format ----------
  255. # Archiver: ZIP 2.0.1 and UNZIP 5.0p1 by Info ZIP.
  256. # ZIP needs an ending slash to delete dirs.
  257. # No need to test for relPath being "\\" because cannot delete root
  258. # Do not use -g (grow existing file) unless you decide not to use
  259. # ^C to interrupt suspicious archive operations.
  260. # Unzip does not allow passing the password on command line.
  261. # You could use $G to allow seeing the password prompt.
  262. /Z
  263. # O:    unzip -o$P( -e $W) $A "$L($F)"
  264. O:    unzip -o $A "$L($F)"
  265. I:    zip $A "$F"
  266. D:    zip $A "$F"
  267. U:    zip -d $A "$F"
  268. R:    zip -d $A "$F/"
  269.  
  270. #---------- ZOO format ----------
  271. # Archiver: zoo 2.1 by Rahul Dhesi
  272. # I used to use just "-extract"
  273. # "e" = extract
  274. # "." = make pathnames relative to "."
  275. # "O" = overwrite without asking
  276. # I used to use just "-add"
  277. # "a" = add; "P" = pack after adding, remove overwritten or
  278. # deleted files (leaves a .bak file, use PP to overwrite it)
  279. # I used to use just "-delete"
  280. # "D" = delete; "P" = pack after deletion, use PP if .bak file exists
  281. /O
  282. O:    zoo e.O $A$E(.) $F
  283. I:    zoo aPP $A$E(.) $F
  284. D:    zoo aPP $A$E(.) $F
  285. U:    zoo -delete $A$E(.) $F
  286. # U:    zoo D $A$E(.) $F
  287. R:    $U
  288.  
  289.